@use 'sass:map';
@use '@angular/material' as mat;

@mixin color($theme) {
  $config: mat.get-color-config($theme);

  $primary-palette: map.get($config, 'primary');
  $accent-palette: map.get($config, 'accent');
  $background: map.get($config, background);
  $foreground: map.get($config, foreground);

  .pac-indicator-market {
    .ngm-tree-select {
      // background-color: mat.get-color-from-palette($background, card);

      .mat-tree.ngm-tree-select__panel {
        overflow-y: auto;
      }

      .ngm-tree-select__search .mat-form-field-infix {
        display: inline-flex;
      }
    }
  }
}

@mixin density($theme) {
  .pac-indicator-register__form {
    .mat-tab-label {
      min-width: unset;
    }
    .mat-tab-body-content {
      padding-top: 1rem;
    }
    .mat-radio-label {
      margin-left: 1rem;
    }
  }
}

@mixin theme($theme) {
  $color: mat.get-color-config($theme);
  $density: mat.get-density-config($theme);
  $typography: mat.get-typography-config($theme);

  @if $color != null {
    @include color($color);
  }
  @if $density != null {
    @include density($density);
  }
  @if $typography != null {
    @include typography($typography);
  }
}
